/*
 * 易族智汇（北京）科技有限公司 版权所有。
 * 未经许可，您不得使用此文件。
 * 官方地址：www.javamall.com.cn
 */
package com.enation.app.javashop.core.client.feignimpl.trade;

import com.enation.app.javashop.client.trade.BillClient;
import com.enation.app.javashop.core.client.fallback.trade.BillClientFallbackFactory;
import com.enation.app.javashop.core.handler.FeignConfiguration;
import com.enation.app.javashop.model.orderbill.dos.BillItem;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author fk
 * @version v1.0
 * @Description: 结算单对外接口
 * @date 2018/7/31 10:14
 * @since v7.0.0
 */
@FeignClient(name = "trade-service", fallbackFactory = BillClientFallbackFactory.class,configuration = {FeignConfiguration.class})
public interface BillClientFeignImpl extends BillClient {


    /**
     * 生成结算单
     */
    @Override
    @RequestMapping(value = "/client/bills/create", method = RequestMethod.GET)
    void createBills(@RequestParam("start_time") Long startTime, @RequestParam("end_time") Long endTime);

    /**
     * 添加结算单项表
     *
     * @param billItem 结算单项表
     * @return BillItem 结算单项表
     */
    @Override
    @RequestMapping(value = "/client/bills/items", method = RequestMethod.POST)
    BillItem add(@RequestBody BillItem billItem);


}
